﻿using Microsoft.Xna.Framework;

namespace WaterExample
{
    /// <summary>
    /// Options that must be passed to the water component before Initialization
    /// </summary>
    /// <remarks>Based on http://graphicsrunner.blogspot.com/search/label/Water</remarks>
    public class WaterOptions
    {
        //the number of vertices in the x and z plane (must be of the form 2^n + 1)
        //and the amount of spacing between vertices
        public int Width = 257;
        public int Height = 257;
        public float CellSpacing = .5f;

        //how large to scale the wave map texture in the shader
        //higher than 1 and the texture will repeat providing finer detail normals
        public float WaveMapScale = 1.0f;

        //size of the reflection and refraction render targets' width and height
        public int RenderTargetSize = 512;

        //offsets for the texcoords of the wave maps updated every frame
        //these are used in combination with the velocities to scroll
        //the normal maps over the water plane. Resulting in the appearence
        //of moving ripples across the water plane
        public Vector2 WaveMapOffset0 = Vector2.Zero;
        public Vector2 WaveMapOffset1 = Vector2.Zero;

        //the direction to offset the texcoords of the wave maps
        public Vector2 WaveMapVelocity0;
        public Vector2 WaveMapVelocity1;

        //asset names for the normal/wave maps
        public string WaveMapAsset0;
        public string WaveMapAsset1;

        //water properties
        public Vector4 WaterColor;
        public Vector3 WaterPosition;

    }
}
